﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using yq.Model.Logic;
using yq.Business;
using yq.IBase.DBHelper;
using yq.IBase;
using yq.IBase.Basis;


public static class test
{
    public static T LocdModel<T>(this ModelBase<T> info, string id) where T : ModelBase<T>, new()
    {
        var model = yq.CaChe<T>.Client().HGet(id);
        if (model.IsLoad == false)
        {
            model = info.Load(id);
            if (model.IsLoad)
            {
                yq.CaChe<T>.Client().HSet(id, model);
            }
        }
        return model;
    }
}
